// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import store from '@/store'
import './permission'
import './styles/index.scss'
import 'element-ui/lib/theme-chalk/index.css'
import Element from 'element-ui'
import '@/icons'
import permissionDirective from '@/directive/permission'
import 'mavon-editor/dist/css/index.css'
import mavonEditor from 'mavon-editor'
import * as filters from '@/filters/'

Vue.config.productionTip = false

// use
Vue.use(mavonEditor)
Vue.use(Element)
Vue.use(permissionDirective)

// 注册全局filters
Object.keys(filters).forEach(key => {
  Vue.filter(key, filters[key])
})

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
